package com.eonmind.knowledge.service;

import com.eonmind.common.contract.data.response.PageResponse;
import com.eonmind.knowledge.dto.KnowledgeDto;
import com.eonmind.user.contract.dto.UserInfoData;


/**
 * @Author: AKang
 * @Description:
 * @CreateTime: 2025-05-09
 */
public interface KnowledgeService {

    /**
     * 创建知识库
     **/
    void saveKnowledge(KnowledgeDto.KnowledgeCreateRequest knowledgeCreateRequest,  UserInfoData userInfoData);
    /**
     * 修改知识库
     **/
    void updateKnowledge(KnowledgeDto.KnowledgeUpdateRequest knowledgeUpdateRequest, UserInfoData userInfoData);
    /**
     * 删除知识库
     **/
    void deleteKnowledge(KnowledgeDto.KnowledgeDeleteRequest knowledgeDeleteRequest,  UserInfoData userInfoData);

    /**
     * 查询该用户下的知识库
     **/
    PageResponse<KnowledgeDto.KnowledgeResponse> listKnowledge(UserInfoData userInfoData,KnowledgeDto.KnowledgePageRequest knowledgePageRequest);

    /**
     * 根据indexId获取indexName
     **/
    String getIndexNameByIndexId(String indexId);
    /**
     * 根据知识库id和用户id判断知识库是否为该用户所拥有
     **/
    boolean getKnowledgeByKnowledgeIdAndUserId(Long knowledgeId, Long userId);
}
